package com.wise.summer.v1.portal.content.uploadresources;

import com.wise.framework.annotations.ApiInfo;
import com.wise.framework.annotations.Publish;
import com.wise.framework.annotations.SkipUserAuth;
import com.wise.framework.annotations.validation.NotBlank;
import com.wise.framework.daoannotations.Column;
import com.wise.framework.restful.PageParamGitHub;
import com.wise.framework.restful.PageResultList;
import lombok.Getter;
import lombok.Setter;

import java.sql.Timestamp;

import static com.wise.model.content.ContentErrMsgs.Err_100100000012;

@Getter
@Setter
@SkipUserAuth
@Publish
@ApiInfo("分页显示下载资源")
public class ListUploadResources extends PageParamGitHub<PageResultList<ListUploadResources.Result>> {

	@ApiInfo("所属分组")
	@NotBlank(msg = Err_100100000012)
	private String groupId;

	@ApiInfo("资源名")
	private String resourceName;

	@Getter
	@Setter
	public static class Result {

	    @Column("id")
	    private String id;

//        @ApiInfo("分组ID")
//        @Column("group_id")
//        private String groupId;

        /*分组ID*/
        @Column("resource_name")
        private String resourceName;

        @ApiInfo("资源访问地址")
        @Column("path")
        private String path;

//        @ApiInfo("资源链接的媒体文件访问地址")
//        @Column("resource_path")
//        private String resourcePath;

//        @ApiInfo("第三方对象存储id")
//        @Column("oss_id")
//        private String ossId;

        /*文件扩展名，不需要包含前面的点*/
        @ApiInfo("文件扩展名")
        @Column("extention_name")
        private String extentionName;

        @ApiInfo("资源原名称")
		@Column("origin_resource_name")
		private String originResourceName;
        /*mime_type*/
//        @Column("mime_type")
//        private String mimeType;
//
//        @Column("image_height")
//        private Integer imageHeight;
//
//        @Column("image_width")
//        private Integer imageWidth;
//
//        @Column("resource_type")
//        private Integer resourceType;
        @Column("creation_date")
        private Timestamp creationDate;

        @ApiInfo("文件大小")
        @Column("file_size")
        private long fileSize;

        @ApiInfo("上传时间")
        @Column("upload_time")
        private String uploadTime;

        @ApiInfo("描述")
        @Column("file_describe")
        private String describe;
	}
}
